﻿@model GPS.ENTITYS.ViewModelSTHAMSO
@using PagedList.Mvc;
@using GPS.Helpers;

@{
    ViewBag.Title = "Danh mục điểm thi tốt nghiệp";
}
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
<script src="~/Scripts/jquery.maskedinput.js"></script>
<script src="~/Scripts/datepicker.js"></script>
<div class="container fdb-div-content fdb-div-corner-all">
    <h3 class="text-center fdb-title-search-form">danh mục điểm thi tốt nghiệp</h3>
    <div class="row">
        @using (Html.BeginForm("Index", "GPS_DiemThiTotNghiep", FormMethod.Get))
        {
            <div class="list-group">
                <fieldset class="fs_body">
                    <legend class="head_title">Điều kiện tìm kiếm</legend>
                    <div class="criteria_search">
                        <div class="row  margin-top-05">
                            <div class="col-md-2 control-label">
                                Mã sát hạch:
                            </div>
                            <div class="col-md-4">
                                @Html.TextBoxFor(model => model.tTHAMSO_MA, new { @class = "form-control" })
                            </div>
                        </div>
                        <div class="row margin-top-05">
                            <div class="col-md-2 control-label">
                                Trạng thái:
                            </div>
                            <div class="col-md-4">
                                @Html.DropDownListFor(model => model.tTHAMSO_ACTIVE, new List<SelectListItem>
                                {
                                    new SelectListItem() {Text = "--Lựa Chọn--", Value=""},
                                    new SelectListItem() {Text = "Không hiệu lực", Value="0"},
                                    new SelectListItem() {Text = "Hiệu lực", Value="1"}
                                }, new { @class = "form-control" })
                            </div>
                        </div>
                        <div class="row margin-top-05 btn_search">
                            <button type="submit" class="btn btn-warning btn-sm">
                                <span class="glyphicon glyphicon-search"></span> Tìm kiếm
                            </button>
                        </div>
                    </div>
                </fieldset>
            </div>
        }
        <br />
        <div class="row">
            <fieldset class="fs_body">
                <legend class="head_title">Kết quả tìm kiếm</legend>
                <div class="row margin-top-05">
                    <div class="divbtnFielset">
                        <div style="float: right;">
                            <label id="lblMessageTotal" style="color:blue; font-weight:bold">Tổng Số Bản Ghi: @ViewBag.TotalRow</label>
                        </div>
                    </div>
                </div>
                <div class="row margin-top-05">
                    <table class="table table-striped table-hover table-bordered table-condensed">
                        <tr>
                            <th>
                               STT
                            </th>
                            <th>
                                Mã điểm
                            </th>
                            <th>
                                Giá trị
                            </th>
                            <th>
                                Mô tả
                            </th>
                            <th>
                                Trạng thái
                            </th>
                            <th>
                                Thao tác
                            </th>
                        </tr>
                        @{
                            if (Model.SearchResults != null)
                            {
                                foreach (var item in Model.SearchResults)
                                {
                                    <tr>
                                        <td align="center">
                                            @Html.DisplayFor(modelItem => item.STT)
                                        </td>
                                        <td>
                                            @Html.DisplayFor(modelItem => item.THAMSO_MA)
                                        </td>
                                        <td>
                                            @Html.DisplayFor(modelItem => (item.THAMSO_GIATRI))
                                        </td>
                                        <td>
                                            @Html.DisplayFor(modelItem => item.THAMSO_MOTA)
                                        </td>
                                        <td>
                                            @Html.DisplayFor(modelItem => item.THAMSO_ACTIVE)
                                        </td>
                                        <td align="center">
                                            <a href="@Url.Action("Detail", "GPS_DiemThiTotNghiep", new { id = item.THAMSO_MA })" data-modal="">
                                                <img src="@Url.Content("~/fonts/grid-view-icon.png")" title="Xem chi tiết Điểm" />
                                            </a>
                                        </td>
                                    </tr>
                                }
                            }
                        }
                    </table>
                </div>

                <div class="row margin-top-05">
                    <div class="pagination-sm">
                        @Html.PagedListPager(Model.SearchResults, page => Url.Action("Index", new
                       {
                           page,
                           Model.tTHAMSO_MA,
                           Model.tTHAMSO_ACTIVE
                       }))
                    </div>
                </div>
            </fieldset>
        </div>
    </div>
</div>


<!-- delete modal placeholder-->
<div id='deleteModal' class='modal fade in'>
    <div class="modal-dialog">
        <div class="modal-content">
            <div id='deleteModalContent'></div>
        </div>
    </div>
</div>

<!-- modal placeholder-->
<div id='myModal' class='modal fade in'>
    <div class="modal-dialog">
        <div class="modal-content">
            <div id='myModalContent'></div>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/modalform")
}


